<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    //1.默认值的生效条件：对象的属性值严格等于undefined，对应的默认值才会生效
    const {name='aa',age=0}={name:'bb'}
    console.log(name,age);
    //如果默认值是表达式，默认值表达式是惰性求值的
    //3.将一个已经声明的变量用于解构赋值
    let x=2;
    ({x}={x:1})
    console.log(x);
    //4.可以取到继承的属性
    const {toString}={}
    console.log(toString);
    console.log({});
    console.log(Object.prototype);
  </script>
</body>
</html>